package top.kaoshanji.r1ch05a;

import org.springframework.beans.factory.support.MethodReplacer;

import java.lang.reflect.Method;

/**
 * 代码清单-r1ch05a-143页a：方法替换，实现MethodReplacer接口
 * @author kaoshanji
 * ^_^
 * create time 2025/5/5 20:13
 */
public class Boss2 implements MethodReplacer {

    @Override
    public Object reimplement(Object obj, Method method, Object[] args) throws Throwable {

        Car car = new Car();
        car.setBrand("美人豹");

        return car;
    }
}
